import {
  model
} from "../utils/extendAPI";
// export const swipeCell =Behavior({})
module.exports = Behavior({ 
  data: {
    swipeCellList: []
  },
  methods: {
    // 当用户打开划块时
    swipeCellOpen(e) {
      const instance = this.selectComponent(`#${e.target.id}`);
      this.data.swipeCellList.push(instance)
    },
    // 整个页面
    swipeCellPage(){
      this.click()
    },
    // 划块
    swipeCellClick(){
      this.click()
    },
    click() {
      this.data.swipeCellList.forEach(function (element) {
        element.close()
      });
      this.setData({
        swipeCellList: []
      })
    },
  }
})